feat(types): add custom properties on EditorOptions#3761
feat(types): add custom properties on EditorOptions#3761
Conversation
|
@TotomInc is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
📝 WalkthroughWalkthroughThis pull request extends the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/types/schema.ts (1)
54-54: Consider clarifying the fieldDescription comment.The comment "When defined, set a description for the field" could be more specific about where the description appears. The documentation states it displays "under the field name," which provides clearer context for developers.
💬 Suggested comment improvement
- fieldDescription?: string // When defined, set a description for the field + fieldDescription?: string // When defined, displays description text under the field name🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/types/schema.ts` at line 54, Update the comment for the fieldDescription property in src/types/schema.ts to clarify where the description appears; replace "When defined, set a description for the field" with a more specific note such as "Optional description displayed under the field name in the UI" so developers know this text appears beneath the field label; locate the fieldDescription declaration in the schema.ts type definition to apply the change.docs/content/changelog/studio-customisation.md (1)
115-117: Clarify the fieldName documentation.The phrase "editor input name" is somewhat vague. Consider aligning with the code comment which more clearly states this "overrides the auto-generated field name." Suggest rewording to: "Overrides the auto-generated field name in Studio editor with a custom display name."
📝 Suggested documentation improvement
-You can set the editor input name in Studio editor. +Overrides the auto-generated field name in Studio editor with a custom display name.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/content/changelog/studio-customisation.md` around lines 115 - 117, Update the docs for the `fieldName: String` property to be explicit: replace the vague "You can set the editor input name in Studio editor." with a sentence like "Overrides the auto-generated field name in the Studio editor with a custom display name." Make sure the wording references the same symbol `fieldName: String` and mentions the Studio editor so readers can map it back to the code comment about overriding the auto-generated field name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/content/changelog/studio-customisation.md`:
- Around line 115-117: Update the docs for the `fieldName: String` property to
be explicit: replace the vague "You can set the editor input name in Studio
editor." with a sentence like "Overrides the auto-generated field name in the
Studio editor with a custom display name." Make sure the wording references the
same symbol `fieldName: String` and mentions the Studio editor so readers can
map it back to the code comment about overriding the auto-generated field name.
In `@src/types/schema.ts`:
- Line 54: Update the comment for the fieldDescription property in
src/types/schema.ts to clarify where the description appears; replace "When
defined, set a description for the field" with a more specific note such as
"Optional description displayed under the field name in the UI" so developers
know this text appears beneath the field label; locate the fieldDescription
declaration in the schema.ts type definition to apply the change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 23253ee9-9a48-44ad-a500-0651c033820e
📒 Files selected for processing (2)
docs/content/changelog/studio-customisation.mdsrc/types/schema.ts
🔗 Linked issue
Nuxt-Studio upstream: nuxt-content/nuxt-studio#400
❓ Type of change
📚 Description
In order to improve Nuxt Studio UI, we need to expose more properties in the Zod schema, from
EditorOptionstype.These added properties will allow Nuxt Studio UI to improve the editing experience of content-editors.
For this PR:
fieldName: when defined, override the auto-generated field-name on the Nuxt Studio fieldfieldDescription: when defined, use Nuxt UIFormFielddescription prop to display an extra text under the field nametooltip: when defined, display an info-bubble next to the field-name with thetooltipas text content📝 Checklist